<template>
  <view class="activity-poster" >
    <!-- :style="{backgroundImage: `url(${urlParams.posterImgUrl})`}" -->
     <image class="poster-img" mode="widthFix" :src="urlParams.posterImgUrl">
      
     </image>
  </view>
</template>
<script setup>
import {reactive} from 'vue'
import {onShow} from "@dcloudio/uni-app";
import {getUrlParamsInH5, getUrlParamsInWeixin} from "@/utils/utils";


let urlParams = reactive({
  posterImgUrl: '',
  item: '1'
})
onShow(() => {
  /* #ifdef MP-WEIXIN */
  urlParams = Object.assign(urlParams, getUrlParamsInWeixin())
  console.log("urlParams",urlParams);
  /* #endif */
  /* #ifndef MP-WEIXIN */
  urlParams = {...getUrlParamsInH5()}
  /* #endif */
  console.log(urlParams)
})
</script>
<style scoped lang=less>
.activity-poster {
  width: 100vw;
  // height: 100vh;
  // background-size: 100% contain;
  // background: no-repeat;
  .poster-img {
    width: 100vw;
    height:auto;
  }
}
</style>
